<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

class PreTime extends BaseModel
{
    use HasDateTimeFormatter;

    // 类型
    const TYPE_DATE = 1;//日期
    const TYPE_TIME = 2;//时间

    // 关联类型
    const REL_TYPE_CAMP = 1;//门票
    const REL_TYPE_LEASE = 2;//租赁
    const REL_TYPE_COMBO = 3;//套餐

    protected $table = 'pre_time';

    public static function typeMap()
    {
        return [self::TYPE_DATE => '日期', self::TYPE_TIME => '时间'];
    }

    public static function relTypeMap()
    {
        return [self::REL_TYPE_CAMP => '门票', self::REL_TYPE_LEASE => '租赁', self::REL_TYPE_COMBO => '套餐'];
    }
}
